<include file="Public:head" title="订单列表"/>
<script  src="__PUBLIC__/js/My97DatePicker/WdatePicker.js"></script>
<div class="main-container" id="main-container">
    <div class="main-container-inner">
        <include file="Public:left" />
        <div class="main-content">
            <div class="breadcrumbs" id="breadcrumbs">
                <ul class="breadcrumb">
                    <li><i class="icon-home home-icon"></i><a href="__APP__/{$Think.MODULE_NAME}">首页</a></li>
                    <li><a href="{:U('Order/lists')}">订单管理</a></li>
                    <li class="active">订单列表</li>
                </ul>
            </div>
            <div class="page-content">
                <div class="row">
                    <div class="col-xs-12">
                        <div class="row">
                            <div class="col-xs-12">
                                <div class="header smaller lighter blue">
                                    <div class="nav-search col-xs-10" id="nav-search">
                                        <form class="form-search" method="get">
                                            <div class="search_area">
                                                <input type="text"  name="start_date" class="form-control Wdate"onclick="WdatePicker()"autocomplete="off" value='{$starttime}' />
                                                <input type="text"  name="end_date" class="form-control Wdate"onclick="WdatePicker()"autocomplete="off" value='{$endtime}' />

                                                <select name="shop_id" autocomplete="off">
                                                    <option value="0">请选择店铺</option>
                                                    <foreach name="shops" item="row">
                                                        <option value="{$row.id}"<if condition="$row.id eq $shop_id">selected</if>>
                                                        {$row.name}                                                
                                                        </option>
                                                    </foreach>
                                                </select>
                                                <select name="state" autocomplete="off">
                                                    <option value="">请选择订单状态</option>
                                           
                                                        <option value="0"<if condition="$state eq 0 && $state neq ''">selected</if>>
                                                        等待审核                                               
                                                        </option>
                                                        <option value="1"<if condition="$state eq 1">selected</if>>
                                                        审核完成                                               
                                                        </option>
                                                        <option value="5"<if condition="$state eq 5">selected</if>>
                                                        成功订餐                                               
                                                        </option>
                                                        <option value="9"<if condition="$state eq 9">selected</if>>
                                                        订单失效                                               
                                                        </option>
                                                    </foreach>
                                                </select>
                                                <input class="form-control search-query" type="text" name="keyword" autocomplete="off"  placeholder="请输入姓名、手机或地址" value="{$Think.get.keyword}">
                                                <button class="btn btn-purple btn-sm" type="submit">搜 索 <i class="icon-search icon-on-right bigger-110"></i></button>
                                            </div>
                                        </form>
                                    </div>
                                    <div class='cl'></div>
                                </div>
                                <notempty name='lists'>
                                    <div class="table-responsive">
                                        <table id="sample-table-1" class="table table-striped table-bordered table-hover">
                                            <thead>
                                                <tr>
                                                    <th class="center" width='45px'>
                                                        <label>
                                                            <input type="checkbox" class="ace"  autocomplete="off"/>
                                                            <span class="lbl"></span>
                                                        </label>
                                                    </th>
                                                    <th width='45px' class="center">序号</th>
                                                    <th width='120px'>订单号</th>
                                                    <th width='150px'>店铺</th>
                                                    <th width='250px'>订餐内容</th>
                                                    <th>总价</th>
                                                    <th>姓名</th>
                                                    <th width='60px'>电话</th>
                                                                                                  <th>地址</th>
                                            <if condition="$short.is_start eq 1"><th>短信发送</th></if>
                                            <if condition="$email.is_start eq 1"><th>邮箱发送</th></if>
                                            <th>状态</th>
                                            <th width="90px"><i class="icon-time bigger-110"></i>下单时间</th>
                                            <th width="65px">操作</th>
                                            </tr>
                                            </thead>
                                            <tbody>
                                            <foreach name="lists" item="row">
                                                <tr>
                                                    <td class="center">
                                                        <label><input type="checkbox" class="ace" name="ids" value="{$row.id}" autocomplete="off" /><span class="lbl"></span></label>
                                                    </td>
                                                    <td class="center">{$key+1|getPageKey}</td>
                                                    <td>
                                                        <a href="{:U('Order/detail',array('id'=>$row['id']))}" title="{$row.goods}">{$row.ordernum}</a>
                                                        <input type="hidden"  id="phone_{$row.id}" value="{$row.phone_shop}">
                                                        <input type="hidden"  id="email_{$row.id}" value="{$row.email}">
                                                    </td>
                                                    <td id="shop_{$row.id}" style="text-align: left"><a href="{:U('Shop/detail',array('id'=>$row['sid']))}" target="_blank">{$row.sid|getSingleField=###,'shop','name'}</a></td>
                                                    <td style="text-align: left">{$row.goods} {$row.remark}</td>
                                                    <td>{$row['realMoney']}</td>
                                                    <td>{$row.truename}</td>
                                                    <td>{$row.phone} <if condition="$row.phone2 neq ''"><p>{$row.phone2}</p></if></td>
                                                                              <td style="text-align: left">{$row.addr}</td>
                                                <if condition="$short.is_start eq 1"><td><if condition="$row.is_send_phone eq 1"><span class="green">已发送</span><else/><span style="color:#666">未发送</span></if></td></if>
                                                <if condition="$email.is_start eq 1"><td><if condition="$row.is_send_email eq 1"><span class="green">已发送</span><else/><span style="color:#666">未发送</span></if></td></if>    
                                                <td>{$row.state|getOrderState=###}</td>
                                                <td>{$row.addtime|date="m-d H:i",###}</td>
                                                <td class="action-buttons">
                                                    <a class="blue" href="{:U('Order/detail',array('id'=>$row['id']))}" data-rel="tooltip" data-original-title="查看"><i class="icon-zoom-in bigger-130"></i></a>
                                                    <a class="red" data-toggle="modal"  onclick="targetDelTable('{$row.id}')"><i class="icon-trash bigger-130"></i></a>
                                                </td>
                                                </tr>
                                            </foreach>
                                            </tbody>
                                        </table>

                                    </div>
                                    <div id="grid-pager" class="ui-state-default  ui-corner-bottom" dir="ltr">
                                        <table width='100%' data-table='order'  id='modal_del_table'>
                                            <tr>
                                                <td>
                                                    <div class="visible-md visible-lg hidden-sm hidden-xs action-buttons">
                                                        <a class="purple" href="{:U('Order/detail')}" data-rel="tooltip" data-original-title="手工下单">
                                                            <i class="icon-plus-sign bigger-130"></i>
                                                        </a>
                                                        <a class="red" data-toggle="modal" onclick="targetDelTable(0)"  data-rel="tooltip" data-original-title="批量删除">
                                                            <i class="icon-trash bigger-130"></i>
                                                        </a>
                                                    </div>
                                                </td>
                                                <td class='td_pager'><div class='pager'>{$page}</div></td>
                                            </tr>
                                        </table>
                                    </div>
                                    <else/>
                                    <p class='noempty'>没有符合条件的记录！</p>
                                </notempty>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <include file="Public:setting" />
    </div>
</div>
<include file="Public:del" />
<include file="Public:foot" />